package cn.cqs.redisitem.dao;

import cn.cqs.redisitem.entity.PcUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @discription :
 * @author: cqs
 * @date: 2020-11-03 1:07
 */
@Repository
public interface RespositoryPcUser extends JpaRepository<PcUser,Integer>{

        //    自定义jpa-sql
        @Modifying
        @Query(value ="update PcUser sys set sys.password=:password where sys.id=:id"  )
        public void updatebyId(@Param("id")int id, @Param("password") String password);
    }

